Imports IIC.Forms.Edit

Namespace Forms.List

    ''' <summary>
    ''' Form used to select students for a class or Exam Session
    ''' </summary>
    ''' <remarks></remarks>
    Public Class frmStudentListSelect
        Inherits frmStudentListBase

        ''' <summary>
        ''' This method is called from UIMergePersonSelector, 
        ''' when we open the form to select a person to be merged with another person
        ''' </summary>
        ''' <param name="stayStudent">Stundet object of the student to stay</param>
        ''' <remarks></remarks>
        Public Sub setMergeStudent(ByVal stayStudent As Student)

            CType(Me.grdData, Grid.CGSQLGrid).gpWhereclause = "studentid<>" & stayStudent.StudentId
            Me.Text = "Select Stundent to Merge with " & stayStudent.StudentFullName
            Me.tsTxtSearch.Text = stayStudent.LastName
            Me.grdData.loadGrid()
            Me.executeSearch(stayStudent.LastName)

        End Sub
        Public Sub setClasssToAddStudents(ByVal pclass As PeriodClass)

            If pclass.Period.isPVAK Then

            ElseIf pclass.Period.DiplomaSuperType.OpenToMembersOnly Then
                CType(Me.grdData, Grid.CGSQLGrid).gpWhereclause = "isMember=1"

            Else

            End If

            Me.grdData.loadGrid()

        End Sub

        
        Private Sub frmStudentListSelect_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            'set form to select mode
            Me.GridMode = enumGridFormMode.MODE_SELECT
        End Sub
    End Class


End Namespace
